package com.yansu.cloud.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.yansu.cloud.bean.User;

/**
 * 
 * @author 言肃
 * @email yansu_code@126.com
 * @version 1.0
 * @date Jul 28, 2018 3:12:32 PM
 */
// 这里fallbackFactory是对fallback的增强
@FeignClient(name = "microservice-provider-user", fallbackFactory = UserHystrixFallBackFactory.class)
public interface UserFeignClient {

	@RequestMapping(value = "/simple/{id}", method = RequestMethod.GET)
	User findById(@PathVariable("id") Long id);

}